package com.acme.task4;

public class Task4Arrays {
	static final String FRMT_NUMBER_OF = "Number of %d: %d";
	
	public static void main(String[] args) {
		printNumberOf();		
	}
	
	static void printNumberOf() {
		int array[] = new int[10];
		array[0] = 7;
		array[1] = 9;
		array[2] = 9;
		array[3] = 3;
		array[4] = 7;
		array[5] = 9;
		array[6] = 3;
		array[7] = 7;
		array[8] = 9;
		array[9] = 3;
		
		int numberOf3 = 0, numberOf7 = 0, numberOf9 = 0;
		for (int i=0; i<array.length; i++) {
			switch (array[i]) {
			case 3:
				numberOf3++;
				break;
			case 7:
				numberOf7++;
				break;
			case 9:
				numberOf9++;
				break;
			}
		}

		System.out.println(String.format(FRMT_NUMBER_OF, 3, numberOf3));
		System.out.println(String.format(FRMT_NUMBER_OF, 7, numberOf7));
		System.out.println(String.format(FRMT_NUMBER_OF, 9, numberOf9));
	}
}
